package com.care.wardmate.remote;

import com.care.common.core.domain.Result;
import com.care.common.core.result.PageResult;
import com.care.wardmate.common.domain.Article;
import com.care.wardmate.common.request.ArticleRequest;
import com.care.wardmate.remote.factory.ArticleRemoteServiceFallbackFactory;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

@FeignClient(contextId = "ArticleRemoteService" , name = "care-wardmate",fallbackFactory = ArticleRemoteServiceFallbackFactory.class)
public interface ArticleRemoteService {
    @PostMapping("/article/selectArticle")
    public Result<PageResult<Article>> selectArticle(@RequestBody ArticleRequest articleRequest);
    @GetMapping("/selectArticleById/{articleId}")
    public Result<Article> selectArticleById(@PathVariable("articleId") Integer articleId);
}
